All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.qd.Region
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.util.QTHandleRef
|
+----quicktime.qd.Region
- public final class Region
- extends QTHandleRef
- implements QuickTimeLib, Cloneable
The Region represents an arbitary area or set of areas on the drawing coordinate plane.
Methods are implemented for a corresponding QuickDraw structure used by QuickTime.
Refer to Region in QuickTime documentation.
-
Region()
- Allocates a new empty region.
-
Region(PixMap)
- Converts a specified BitMap or PixMap to a region.
-
Region(QDRect)
- Allocates a new region specified by a rectangle.
-
clone()
- Copies the mathematical structure of the implicit region into a newly created region.
-
copy()
- Copies the mathematical structure of the implicit region into a newly created region.
-
diff(Region)
- Calculates the subtracts the specified explicit region from the implicit region and creates a new region representing that structure.
-
empty()
- Determines whether a region is empty or not.
-
equalRgn(Region)
- Compares two regions for sizes, shapes, and locations.
-
fromGraphicsImporter(GraphicsImporter)
- Determines the current clipping region.
-
fromMovieBounds(Movie)
- This method allows your application to determine a movie's boundary region.
-
fromMovieClip(Movie)
- This method allows your application to determine a movie's clipping region.
-
fromMovieControllerBadge(MovieController, Region, boolean)
- This method allows you to display a controller's badge.
-
fromMovieControllerBounds(MovieController)
- This method returns the actual region occupied by the controller and its movie,
if the movie is attached to the controller.
-
fromMovieControllerClip(MovieController)
- This method allows you to obtain information describing a movie controller's clipping regions.
-
fromMovieControllerWindow(MovieController, QDGraphics)
- This method allows your application to determine the window region that is
actually in use by a controller and its movie.
-
fromMovieDisplayBounds(Movie)
- This method allows your application to determine a movie's display boundary region.
-
fromMovieDisplayClip(Movie)
- This method allows your application to determine a movie's current display clipping region.
-
fromMovieSegment(Movie, int, int)
- This method allows your application to determine a movie's display boundary region during a specified segment.
-
fromTrackBounds(Track)
- This method allows the media to limit the size of the track boundary rectangle.
-
fromTrackClip(Track)
- This method allows your application to determine the clipping region of a track.
-
fromTrackDisplay(Track)
- This method allows your application to determine the region a track occupies in a movie's graphics world.
-
fromTrackMovieBounds(Track)
- This method allows your application to determine the region the track occupies in a movie's boundary region.
-
fromTrackSegment(Track, int, int)
- This method allows your application to determine the region a track occupies in a movie's graphics
world during a specified segment.
-
fromVideoChannel(VisualChannel)
- Allows you to retrieve a channels clipping region.
-
getBounds()
- Returns a copy of the bounding rectangle of the Region.
-
getRgnBBox()
- Returns a copy of the bounding rectangle of the Region.
-
getSize()
- Returns size of the Region.
-
inset(int, int)
- Moves all points on the region boundary horizontally and vertically by adding the respective parameters to those points.
-
map(QDRect, QDRect)
- Takes the implicit region with one rectangle, maps and scales it to another rectangle.
-
offset(int, int)
- Moves the region horizontally and vertically by adding the respective parameters to all of the region.
-
pointIn(QDPoint)
- Checks whether the pixel below and to the right of the point is within the region.
-
rect(QDRect)
- Resets the mathematical structure to the specified rectangle.
-
rectIn(QDRect)
- Checks whether the specified rectangle intersects the region.
-
sect(QDRect)
- Calculates the intersection of this region and the incoming QDRect
and creates a new region representing that structure.
-
sect(Region)
- Calculates the intersection of two regions and creates a new region representing that structure.
-
setEmpty()
- Resets the mathematical structure to the rectangle (0,0,0,0).
-
setRect(int, int, Dimension)
- Resets the mathematical structure to the specified coordinates and sizes.
-
toString()
- Print information about this object.
-
union(QDRect)
- Calculates the union of this region and the incoming rect,
and creates a new region representing that structure.
-
union(Region)
- Calculates the union of two regions and creates a new region representing that structure.
-
xor(Region)
- Calculates the difference between the union and intersection of two regions and creates a new region representing that structure.
Region
public Region() throws QTException
- Allocates a new empty region.
QuickDraw::NewRgn
Region
public Region(QDRect r) throws QTException
- Allocates a new region specified by a rectangle.
QuickDraw::RectRgn
- Parameters:
- r - the specified rectangle
Region
public Region(PixMap pMap) throws QTException
- Converts a specified BitMap or PixMap to a region.
QuickDraw::BitMapToRegion
- Parameters:
- pMap - the specified pixmap
fromGraphicsImporter
public static Region fromGraphicsImporter(GraphicsImporter gi) throws QTException
- Determines the current clipping region.
QuickTime::GraphicsImportGetClip
- Parameters:
- gi - the GraphicsImporter
- Returns:
- The current clip region or null, if not possible
- See Also:
- getClip
fromMovieDisplayClip
public static Region fromMovieDisplayClip(Movie m) throws QTException
- This method allows your application to determine a movie's current display clipping region.
QuickTime::GetMovieDisplayClipRgn()
- Parameters:
- m - the Movie
- Returns:
- a Region object.
- See Also:
- getDisplayClipRgn
fromMovieDisplayBounds
public static Region fromMovieDisplayBounds(Movie m) throws QTException
- This method allows your application to determine a movie's display boundary region.
The display boundary region encloses all of a movie's enabled tracks
after the track matrix, track clip, movie matrix, and movie clip have
been applied to all of the movie's tracks. This region is in the display
coordinate system of the movie's graphics world.
QuickTime::GetMovieDisplayBoundsRgn()
- Parameters:
- m - the Movie
- Returns:
- a Region object.
- See Also:
- getDisplayBoundsRgn
fromMovieClip
public static Region fromMovieClip(Movie m) throws QTException
- This method allows your application to determine a movie's clipping region.
QuickTime::GetMovieClipRgn()
- Parameters:
- m - the Movie
- Returns:
- a Region object.
- See Also:
- getMovieClipRgn
fromMovieBounds
public static Region fromMovieBounds(Movie m) throws QTException
- This method allows your application to determine a movie's boundary region.
This region is in the movie's display coordinate system.
The movie boundary region encloses all of a movie's tracks after the union of
the track clip and the track matrix has been applied to all the movie's
tracks (but not to the movie itself).
QuickTime::GetMovieBoundsRgn()
- Parameters:
- m - the Movie
- Returns:
- a Region object specifying the movie boundary region.
- See Also:
- getBoundsRgn
fromMovieSegment
public static Region fromMovieSegment(Movie m,
int time,
int duration) throws QTException
- This method allows your application to determine a movie's display boundary region during a specified segment.
QuickTime::GetMovieSegmentDisplayBoundsRgn()
- Parameters:
- m - the Movie
- time - Specifies the starting time of the movie segment to consider.
- duration - Specifies the length of the segment to consider.
- Returns:
- a Region object.
- See Also:
- getSegmentDisplayBoundsRgn
fromMovieControllerBounds
public static Region fromMovieControllerBounds(MovieController mc) throws QTException
- This method returns the actual region occupied by the controller and its movie,
if the movie is attached to the controller.
QuickTime::MCGetControllerBoundsRgn()
- Parameters:
- mc - the MovieController
- Returns:
- a Region object specifying the boundary region for this controller.
- See Also:
- getBoundsRgn
fromMovieControllerWindow
public static Region fromMovieControllerWindow(MovieController mc,
QDGraphics window) throws QTException
- This method allows your application to determine the window region that is
actually in use by a controller and its movie.
QuickTime::MCGetWindowRgn()
- Parameters:
- mc - the MovieController
- window - Specifies the window. This may NOT be null.
- Returns:
- a Region object specifying the window region.
- See Also:
- getWindowRgn
fromMovieControllerClip
public static Region fromMovieControllerClip(MovieController mc) throws QTException
- This method allows you to obtain information describing a movie controller's clipping regions.
QuickTime::MCGetClip()
- Parameters:
- mc - the MovieController
- Returns:
- the clipping region of the entire movie controller
- See Also:
- getClip
fromMovieControllerBadge
public static Region fromMovieControllerBadge(MovieController mc,
Region movieRgn,
boolean returnBadgeRgn) throws QTException
- This method allows you to display a controller's badge.
QuickTime::MCDrawBadge()
- Parameters:
- mc - the MovieController
- movieRgn - Specifies the boundary region of the controller's movie.
- Returns:
- A Region that gives information about the location of the badge.
- See Also:
- drawBadge
fromTrackClip
public static Region fromTrackClip(Track t) throws QTException
- This method allows your application to determine the clipping region of a track.
QuickTime::GetTrackClipRgn()
- Parameters:
- t - the Track
- Returns:
- a Region object specifying the clip region for this track.
- See Also:
- getClipRgn
fromTrackDisplay
public static Region fromTrackDisplay(Track t) throws QTException
- This method allows your application to determine the region a track occupies in a movie's graphics world.
QuickTime::GetTrackDisplayBoundsRgn()
- Parameters:
- t - the Track
- Returns:
- a Region object specifying the track's bounds region.
- See Also:
- getDisplayBoundsRgn
fromTrackMovieBounds
public static Region fromTrackMovieBounds(Track t) throws QTException
- This method allows your application to determine the region the track occupies in a movie's boundary region.
QuickTime::GetTrackMovieBoundsRgn()
- Parameters:
- t - the Track
- Returns:
- a Region object specifying the region the track occupies in a movie's boundary region.
- See Also:
- getMovieBoundsRgn
fromTrackBounds
public static Region fromTrackBounds(Track t) throws QTException
- This method allows the media to limit the size of the track boundary rectangle. Therefore, the region
returned by GetTrackBoundsRgn may not be rectangular and may be smaller than the track boundary region.
QuickTime::GetTrackBoundsRgn()
- Parameters:
- t - the Track
- Returns:
- a Region object specifying the region track's media uses to do drawing.
- See Also:
- getBoundsRgn
fromTrackSegment
public static Region fromTrackSegment(Track t,
int time,
int duration) throws QTException
- This method allows your application to determine the region a track occupies in a movie's graphics
world during a specified segment.
QuickTime::GetTrackSegmentDisplayBoundsRgn()
- Parameters:
- t - the Track
- time - Specifies the starting time of the track segment to consider.
- duration - Specifies the length of the segment to consider. Set this parameter to 0 to
consider an instant in time.
- See Also:
- getSegmentDisplayBoundsRgn
fromVideoChannel
public static Region fromVideoChannel(VisualChannel vc) throws QTException
- Allows you to retrieve a channels clipping region.
QuickTime::SGGetChannelClip QuickTime::SGGetChannelClip
- Parameters:
- vc - the VisualChannel
- Returns:
- the clipping region or null if no clip.
- See Also:
- getClip
getSize
public int getSize()
- Returns size of the Region.
- Overrides:
- getSize in class QTHandleRef
getRgnBBox
public QDRect getRgnBBox()
- Returns a copy of the bounding rectangle of the Region.
- Returns:
- a rect
getBounds
public QDRect getBounds()
- Returns a copy of the bounding rectangle of the Region.
- Returns:
- a rect
rect
public void rect(QDRect r)
- Resets the mathematical structure to the specified rectangle.
Destroys the previous mathematical structure of the implicit region.
QuickDraw::RectRgn
- Parameters:
- r - the specified rectangle
copy
public Region copy() throws QTException
- Copies the mathematical structure of the implicit region into a newly created region.
QuickDraw::CopyRgn
QuickDraw::MacCopyRgn
- Returns:
- A new region copy.
clone
public Object clone()
- Copies the mathematical structure of the implicit region into a newly created region.
QuickDraw::CopyRgn
- Returns:
- A new region copy.
- Overrides:
- clone in class Object
setEmpty
public void setEmpty()
- Resets the mathematical structure to the rectangle (0,0,0,0).
Destroys the previous mathematical structure of the implicit region.
QuickDraw::SetEmptyRgn
setRect
public void setRect(int x,
int y,
Dimension dim)
- Resets the mathematical structure to the specified coordinates and sizes.
Destroys the previous mathematical structure of the implicit region.
May reset the structure to the rectangle(0,0,0,0), if bad parameters.
QuickDraw::SetRectRgn
QuickDraw::MacSetRectRgn
- Parameters:
- x - the specified leftmost position.
- y - the specified topmost position.
- dim - the specified width and height dimension.
offset
public void offset(int dh,
int dv)
- Moves the region horizontally and vertically by adding the respective parameters to all of the region.
QuickDraw::OffsetRgn
QuickDraw::MacOffsetRgn
- Parameters:
- dh - the specified horizontal offset.
- dv - the specified vertical offset.
inset
public void inset(int dh,
int dv)
- Moves all points on the region boundary horizontally and vertically by adding the respective parameters to those points.
QuickDraw::InsetRgn
- Parameters:
- dh - the specified horizontal inset.
- dv - the specified vertical inset.
sect
public Region sect(Region regionB) throws QTException
- Calculates the intersection of two regions and creates a new region representing that structure.
May return an empty region if no intersection or one of the regions is empty.
QuickDraw::SectRgn
- Parameters:
- regionB - the specified intersecting region.
- Returns:
- The region of intersection.
sect
public Region sect(QDRect r) throws QTException
- Calculates the intersection of this region and the incoming QDRect
and creates a new region representing that structure.
May return an empty region if no intersection or one of the regions is empty.
QuickDraw::SectRgn
- Parameters:
- r - the specified intersecting rect.
- Returns:
- The region of intersection.
union
public Region union(Region regionB) throws QTException
- Calculates the union of two regions and creates a new region representing that structure.
May return an empty region if both regions are empty.
QuickDraw::UnionRgn
QuickDraw::MacUnionRgn
- Parameters:
- regionB - the specified region to union with.
- Returns:
- The region of union.
union
public Region union(QDRect rect) throws QTException
- Calculates the union of this region and the incoming rect,
and creates a new region representing that structure.
May return an empty region if both regions are empty.
QuickDraw::UnionRgn
- Parameters:
- rect - the specified rect to union with.
- Returns:
- The region of union.
diff
public Region diff(Region regionB) throws QTException
- Calculates the subtracts the specified explicit region from the implicit region and creates a new region representing that structure.
May return an empty region if the implicit region is empty.
QuickDraw::DiffRgn
- Parameters:
- regionB - the specified region to find difference with.
- Returns:
- The region of difference.
xor
public Region xor(Region regionB) throws QTException
- Calculates the difference between the union and intersection of two regions and creates a new region representing that structure.
May return an empty region if both regions are coincident.
QuickDraw::XorRgn
QuickDraw::MacXorRgn
- Parameters:
- regionB - the specified region to xor with.
- Returns:
- The region of exclusively or.
rectIn
public boolean rectIn(QDRect srcRect)
- Checks whether the specified rectangle intersects the region.
QuickDraw::RectInRgn
- Parameters:
- srcRect - the specified source rectangle
- Returns:
- True if at least one bit of the rectangle is contained by the region, false otherwise.
equalRgn
public boolean equalRgn(Region rgn)
- Compares two regions for sizes, shapes, and locations.
QuickDraw::EqualRgn
QuickDraw::MacEqualRgn
- Parameters:
- obj - the specified comparision region
- Returns:
- true if both regions' sizes, shapes, and locations are identical, false otherwise.
empty
public boolean empty()
- Determines whether a region is empty or not.
QuickDraw::EmptyRgn
- Returns:
- True if region is empty, false otherwise.
map
public void map(QDRect srcRect,
QDRect dstRect)
- Takes the implicit region with one rectangle, maps and scales it to another rectangle.
QuickDraw::MapRgn
- Parameters:
- srcRect - the specified source rectangle
- dstRect - the specified destination rectangle
pointIn
public boolean pointIn(QDPoint pt)
- Checks whether the pixel below and to the right of the point is within the region.
QuickDraw::PtInRgn
- Parameters:
- pt - the specified point.
- Returns:
- True if pt is contained by the region, false otherwise.
toString
public String toString()
- Print information about this object.
- Returns:
- a string representing this Region object
- Overrides:
- toString in class QTHandleRef
All Packages Class Hierarchy This Package Previous Next Index